﻿namespace HKTools
{
    #region Server端 事件

    /// <summary>
    /// Server端事件：当 Client连接成功时 触发
    /// </summary>
    public struct Event_TCP_ClientConnect
    {
        public string _address;
        public int _port;
    }

    /// <summary>
    /// Server端事件：当 Client断开连接时 触发
    /// </summary>
    public struct Event_TCP_ClientDisConnect
    {
        public string _address;
        public int _port;
    }

    /// <summary>
    /// Server端事件：当Client发送来消息时 触发
    /// </summary>
    public struct Event_TCP_FromClientMsg
    {
        public string _address;
        public int _port;
        public string _msg;
    }

    #endregion

    #region Client端 事件

    /// <summary>
    /// Client端事件：当连接到Server端时 触发
    /// </summary>
    public struct Event_TCP_ConnectToServer { }

    /// <summary>
    /// Client端事件：连接Server端，超时时
    /// </summary>
    public struct Event_TCP_ConnectToServerOvertime { }

    /// <summary>
    /// Client端事件：与Server端断开连接时 触发
    /// </summary>
    public struct Event_TCP_DisconnectToServer { }

    /// <summary>
    /// Client端事件：当Server发送来消息时 触发
    /// </summary>
    public struct Event_TCP_FromServerMsg { public string _msg; }

    #endregion
}